package com.weic.design.strategy;

import org.junit.Before;
import org.junit.Test;

import java.util.Arrays;

public class StrategyTest {

    Sorter sorter;
    @Before
    public void before(){
        sorter = new Sorter();
    }

    @Test
    public void testStrategy2(){
        Cat[] arr = {new Cat(1,"kettle"),new Cat(8,"煎蛋"),new Cat(5,"叨乐")};
        sorter.sort(arr);
        System.out.println(Arrays.toString(arr));
    }
    @Test
    public void testStrategy(){
        Dog[] arr = {new Dog(1),new Dog(8),new Dog(5)};
        sorter.sort(arr);
        System.out.println(Arrays.toString(arr));
    }
   /* @Test
    public void testStrategy(){
        int[] arr = {1,8,5,3,4,9};
        sorter.sort(arr);
        System.out.println(Arrays.toString(arr));
    }*/
}
